<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>菜品属性值</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>
                        菜品属性值
                    </h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form method="post" action="__URL__/save_values" class="form-horizontal">
                        <input type="hidden" value="{$result.id}" name="id" id="id">

                        <if condition="$storeId eq 0">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">店铺名称</label>
                                <div class="col-sm-4">
                                    <select id="category2" class="form-control" required name="store_id">
                                        <option value="0" >请选择..</option>
                                        <volist name="store" id="vo">
                                                <option value="{$vo['store_id']}">{$vo['store_name']}</option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                        </if>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">菜品属性</label>
                            <div class="col-sm-4">
                                <select id="category" class="form-control" required name="attribute_id">
                                    <option value="0" >请选择..</option>
                                    <volist name="category" id="vo">
                                        <if condition="$result.attribute_id eq $vo['id']">
                                            <option value="{$vo['id']}" selected >{$vo['name_attribute']}</option>
                                            <else/>
                                            <option value="{$vo['id']}" >{$vo['name_attribute']}</option>
                                        </if>
                                    </volist>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">属性值</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" name="value" id="value" placeholder="请输入属性值"
                                       value="{$result.value}" required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">属性价格</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" name="price" id="price" placeholder="请输入属性价格"
                                       value="{$result.price}" required>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <a class="btn btn-white" href="{:U('Admin/Good/attributes_value_list')}">返回</a>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function () {
        $(".i-checks").iCheck({checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green",})});

</script>
</body>
</html>